#ifndef _CINDICATOR_KDJ_H
#define _CINDICATOR_KDJ_H
namespace GSTrader
{
	namespace Indicator
	{
		class INDICATOR_API KDJ : public CIndicator
		{
		public:
			KDJ();
			virtual ~KDJ();

			virtual CIndicator* CreateInstance();

			virtual void SetParam(double* pdParam);
			virtual void SetInputSeries(CSeries* pSeries);
			virtual double Calculate(int nIndex);
			virtual void RefreshData();

		private:
			int m_n;
			int m_nP1;
			int m_nP2;

			LLVHHV* m_pLLV;
			LLVHHV* m_pHHV;

			SMA* m_pSmaRsv;
			SMA* m_pSmaK;

			CDataSeries* m_pRSV;

			CIndicatorResult* m_pK;
			CIndicatorResult* m_pD;
			CIndicatorResult* m_pJ;
		};
	}
}

#endif // _CINDICATOR_KDJ_H